<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="net.doglog.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Dashboard</title>
<link rel="stylesheet" type="text/css" href="/admin/style.css" />
</head>
<body>

<ul>
	<li><a href="/">Homepage</a></li>
	<li><a href="/admin/post">Post List</a></li>
	<li><a href="/admin/file">File List</a></li>
</ul>
<h3>Dashboard</h3>

<!-- Statistics HERE~ -->

<form action="/admin" method="post">
<h4>Pages</h4>
<fieldset>
<%
String pattern = BlogUtil.attribute(request, "pattern");
String location = BlogUtil.attribute(request, "location");
String pagemsg = BlogUtil.attribute(request, "pagemsg");
%>
<p>
	<label for="pattern">Pattern(start with '/')</label>
	<input type="text" name="pattern" id="pattern" />
</p>
<p>
	<label for="location">Location(relative or "http://")</label>
	<input type="text" name="location" id="location" />
</p>
<p>
	<input type="submit" name="submit" value="Add Page" />
	<span class="msg"><%= pagemsg %></span>
</p>
</fieldset>
<table border="1" cellspacing="0" cellpadding="0">
<% for (Page pageItem : PageUtil.getAllPages()) { %>
<tr>
	<td><%= pageItem.getPattern() %></td>
	<td><%= pageItem.getLocation() %></td>
</tr>
<% } %>
</table>
</form>

</body>
</html>